package com.finance.system.bean.pojo;

import com.finance.framework.lang.BaseObject;
import com.finance.util.Excel.ExcelVOAttribute;
import lombok.Data;
import java.util.Date;
import java.util.List;

/**
 * 用户实体bean
 * Created by CBWL on 2017/3/9.
 */
@Data
public class User extends BaseObject {

    @ExcelVOAttribute(name = "用户编码", column = "A",mustImport = true)
    private String code;//用户编码
    @ExcelVOAttribute(name = "用户姓名", column = "B",mustImport = true)
    private String realName;//真实姓名
    @ExcelVOAttribute(name = "身份证号", column = "C")
    private String idCard;//身份证号
    @ExcelVOAttribute(name = "入职日期", column = "D")
    private Date hireDate;//入职日期
    @ExcelVOAttribute(name = "离职日期", column = "E")
    private Date leaveDate;//离职日期
    @ExcelVOAttribute(name = "手机号", column = "F")
    private String mobile;//手机号码
    @ExcelVOAttribute(name = "所在机构编码", column = "G")
    private String orgCode;//所在机构编码
    @ExcelVOAttribute(name = "结算类型", column = "H",mustImport = true)
    private String settlementType;//结算类型
    @ExcelVOAttribute(name = "工号", column = "I",mustImport = true)
    private String workNo;//工号
    @ExcelVOAttribute(name = "oid", column = "j",mustImport = true)
    private String oid;//工号

    private String onJob;//在职状态
    private String passwd;//密码
    private List<Role> roleList;//角色列表
    private List<Long> roleIdList;//角色id列表
    private String organizationName;//组织机构名称

    @Override
    public boolean equals(Object object) {
        if (object instanceof User) {
            User user = (User) object;
            return user.getCode().equals(this.code);
        }
        return false;
    }

    @Override
    public int hashCode() {
        return this.getCode().hashCode();
    }
}